<template>
    <div>
        <slot name="header" :userobj1="userobj1"></slot>
        <p>我是子组件</p>
        <slot name="footer" :userobj2="userobj2"></slot>
    </div>
</template>

<script>
export default {
    data() {
        return {
            userobj1: {
                name: '孙尚香',
                age: 18
            },
            userobj2: {
                name: '貂蝉',
                age: 16
            }
        }
    }
}
</script>
<style scoped></style>